/*******************************************************************************
 * Copyright (c) 2006 CEA List.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     CEA List - initial API and implementation
 *******************************************************************************/
package com.cea.papyrus.diagram.classdiagram.editpart;

import org.eclipse.uml2.uml.PackageImport;

import com.cea.papyrus.core.editor.ModelManager;
import com.cea.papyrus.core.editpart.connection.TaggedGraphEdgeEditPart;
import com.cea.papyrus.core.figures.connection.DashEdgeFigure;
import com.cea.papyrus.diagraminterchange2.di2.GraphEdge;
import com.cea.papyrus.diagraminterchange2.di2.Uml1SemanticModelBridge;

/**
 * Controler for the {@link PackageImport} link.
 */
public class PackageImportEditPart extends TaggedGraphEdgeEditPart {

	/**
	 * Creates a new PackageImportEditPart.
	 * 
	 * @param graphEdge 
	 * @param modelManager 
	 */
	public PackageImportEditPart(GraphEdge graphEdge,ModelManager modelManager) {
		super(graphEdge,modelManager, "import");
		// theStereotypeLabel=new StereotypeDisplayEditPart((GraphNode)getGraphEdge().getContained().get(0), this.getUmlElement(), modelManager, this);
	}

	/* (non-Javadoc)
	 * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
	 */
	/**
	 * 
	 * 
	 * @return 
	 */
	@Override
	protected DashEdgeFigure createFigure() {
		return new DashEdgeFigure();
	}

	/* (non-Javadoc)
	 * @see com.cea.papyrus.common.editpart.GraphEdgeEditPart#getUmlElement()
	 */
	/**
	 * 
	 * 
	 * @return 
	 */
	@Override
	public PackageImport getUmlElement() {
		return (PackageImport)((Uml1SemanticModelBridge)(getGraphEdge()).getSemanticModel()).getElement();
	}
}